<template>
	<view>
		<view class="title">{{html.title}}</view>
		<view class="date">{{html.createTime}}</view>
		<view class="content"><jyf-parser :html="html.content"></jyf-parser></view>
		<!-- 底部安全区适配 -->
		<view class="safe-area-inset-bottom"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				html:{}
			}
		},
		onLoad(o) {
			this.$u.api.articleDetail({article_id:o.id}).then(res=>{
				this.html = res
				this.$nextTick(()=>{
					this.$app.setTitle(res.title || '')
				})
			})
		}
	}
</script>

<style lang="scss">
	.title{font-weight: bold;font-size: 40rpx;padding: 20rpx 40rpx;}
	.date{color: #666;font-size: 26rpx;padding: 0 40rpx;}
	.content{padding: 20rpx 40rpx 20rpx;}
</style>
